1. Technical Field
This invention generally relates to computer systems, and more specifically relates to apparatus and methods for computer databases.
2. Background Art
Since the dawn of the computer age, computers have evolved and become more and more powerful. In our present day, computers have become indispensable in many fields of human endeavor including engineering design, machine and process control, information storage and retrieval, and office computing. One of the primary uses of computers is for information storage and retrieval.
Database systems have been developed that allow a computer to store a large amount of information in a way that allows a user to search for and retrieve specific information in the database. For example, an insurance company may have a database that includes all of its policy holders and their current account information, including payment history, premium amount, policy number, policy type, exclusions to coverage, etc. A database system allows the insurance company to retrieve the account information for a single policy holder among the thousands and perhaps millions of policy holders in its database.
Database system typically include a database manager that assures the integrity of the database as changes to the database are made. The database manager typically records changes to a database in a journal. The journal allows changes to the database to be rolled back if needed. In addition, a journal may be used to replicate a database by applying the journaled changes to a remote database in the same order the journaled changes were made to the original database.
Most journals known in the art record all fields in a record before a change is made to the record, including fields in the record that do not change. Because recording data that has not changed takes valuable space and time in a database journal, a newer concept known as minimized data journaling was introduced. With a minimized data journal, only the changed fields of a record are recorded, which assumes that the fields in the record that are not represented in the journal did not change.
Because not all information is present in a minimized data journal entry, it is possible under some circumstances that applying the minimized data journal entry to a replicated database may result in problems. If an application changes a record in the database, and a minimized data journal entry is then applied to the changed record, the result may be a mix of old and new data, resulting in an invalid record. To date, minimized journal data has not been extensively used in the industry due to the potential for problems if the journal is not replayed in exactly the same order as the original database, or if changes are made to a database record prior to applying one or more minimized data journal entries to the record. As a result, most database users do not use minimized data journaling due to the potential problems that might arise under certain circumstances. Full journaling is most commonly used, requiring significantly more information to be stored in the journal. Without a way to automatically verify that a database record is in an expected state before applying a minimized data journal entry to the record, the computer industry will be left with the undesirable choice of making full journal entries, at a cost of greater storage requirements and greater required bandwidth for transmitting the journal entries to a remote location, or making minimized journal entries with the potential for problems discussed above. Neither of these choices is desirable.